package com.lonely.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lonely.order.domain.dto.split.SplitOrderDTO;
import com.lonely.order.domain.entity.SysOrderSplit;
import com.lonely.order.domain.vo.split.GetSplitFactoryNameVO;

import java.util.List;
import java.util.Map;

/**
 * 订单分单服务接口
 * author: fzzf
 */
public interface IOrderSplitService extends IService<SysOrderSplit> {

    /**
     * 分单
     *
     * @param splitOrderDTO
     */
    void splitOrders(SplitOrderDTO splitOrderDTO);

    /**
     * 查询指定订单id对应分单工厂名称
     *
     * @param orderIds
     */
    Map<Long, GetSplitFactoryNameVO> getSplitFactoryNameByOrderIds(List<Long> orderIds);

    /**
     * 获取车间分单信息
     *
     * @param produceOrderId
     * @return
     */
    SysOrderSplit getWorkshopSplit(Long produceOrderId);


    /**
     * 获取尾部分单信息
     *
     * @param produceOrderId
     * @return
     */
    SysOrderSplit getTailSplit(Long produceOrderId);
}
